home *** CD-ROM | disk | FTP | other *** search
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "ObjCircle"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
-
- Public x As Single
- Public y As Single
- Public r As Single
-
- Function ObjectType() As String
- ObjectType = "CIRCLE"
- End Function
-
- ' ************************************************
- ' Compute the world coordinate bounds for the
- ' circle.
- ' ************************************************
- Sub Bound(xmin As Single, ymin As Single, xmax As Single, ymax As Single)
- xmin = x - r
- xmax = x + r
- ymin = y - r
- ymax = y + r
- End Sub
-
- ' ************************************************
- ' Write a circle to a file using Write.
- ' Begin with "CIRCLE" to identify this object.
- ' ************************************************
- Sub FileWrite(filenum As Integer)
- Write #filenum, "CIRCLE", x, y, r
- End Sub
- ' ************************************************
- ' Draw the circle on a Form, Printer, or
- ' PictureBox.
- ' ************************************************
- Sub Draw(canvas As Object)
- canvas.Circle (x, y), r
- End Sub
-
- ' ************************************************
- ' Read a circle from a file using Input.
- ' Assume the "CIRCLE" label has already been read.
- ' ************************************************
- Sub FileInput(filenum As Integer)
- Input #filenum, x, y, r
- End Sub
-
-